package com.ssm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Lenovo on 2019-10-3.
 */
@Controller
public class LoginController {
    @RequestMapping("check.do")
    public String check(String username,String password) throws DatabaseException {
       // int i=3/0;
        System.out.println(username);
         if(username.equals("database"))
            throw  new DatabaseException();

        return "redirect:/login.jsp";
    }
}
